﻿
using System;
using System.Web;

public class LiveUpdate : IHttpHandler
{

    //向客户端反馈最新的版本以及下载地址
    public void ProcessRequest(HttpContext context)
    {
        string url =  context.Request.Url.OriginalString.Substring(0,  context.Request.Url.OriginalString.LastIndexOf("/")+1);
        string VersionName = System.Configuration.ConfigurationManager.AppSettings["VersionName"];
        string CabFile = url +  System.Configuration.ConfigurationManager.AppSettings["CabFile"];
        context.Response.Clear();
        context.Response.Write(string.Format("VersionName={0}\rCabFile={1}", VersionName, CabFile));
        
    }

    public bool IsReusable
    {
        get
        {
            return false;
        }
    }

}
